#生成一个指定长度的验证码，验证码由英文字大小写和数字组成
# import random
# def generate_code(length = 4) :
#     str = "01234567899abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
#     code = ""
#     i = 0
#     while i < length :
#         code += str[random.randint(0,len(str)-1)]
#         i += 1
#     return code
# c = generate_code()
# print("生成的随机验证码为:",c)



# import random
# a = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHI"
# c = []
# p = int(input("请输入制定长度:"))
# for i in range(1,100) :
#     b = random.choice(a)
#     c.append(b)
#     if len(c) == p :
#         print("随机产生的验证码为:",c)
#         break


#双色球选号   1. 后一个比第一个数字大，第七个数字随机  2. 键盘输入一个数字，就打印几组号码
# import random
# m = int(input("请输入打印几组号码:"))
# for j in range(m) :
#     a = []
#     c = 27
#     d = 1
#     e = 0
#     f = random.randint(1,c)
#     a.append(f)
#     for i in range(1,99999999) :
#         f = random.randint(1,c+1)
#         if f > a[e] :
#             a.append(f)
#             c += 1
#             e += 1
#             if len(a) == 6 :
#                 break
#     g = random.randint(1,15)
#     a.append(g)
#     print(a)





#打印杨辉三角形
# def generate(numRows) :
#     r = [[1]]
#     for i in range(1,numRows) :
#         r.append(list(map(lambda x,y:x+y,[0]+r[-1],r[-1]+[0])))
#     return r[:numRows]
# a = generate(10)
# for i in a :
#     print(i)










